﻿using System;
using System.ComponentModel.DataAnnotations;
using Furion.DatabaseAccessor;

namespace Cool.Core.Entities.System
{
    public class SysMenu: DEntityBase
    {
        public SysMenu()
        {
            CreatedTime = DateTimeOffset.Now.LocalDateTime;
            IsDeleted = false;
        }
        /// <summary>
        /// 菜单名称
        /// </summary>
        [Required, MaxLength(32)]
        public string MenuName { get; set; }

        /// <summary>
        /// 父菜单ID
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int OrderNum { get; set; }

        /// <summary>
        /// 路由地址
        /// </summary>
        public string Path { get; set; }

        /// <summary>
        /// 组件路径
        /// </summary>
        public string Component { get; set; }

        /// <summary>
        /// 是否为外链（0是 1否）
        /// </summary>
        public char IsFrame { get; set; }

        /// <summary>
        /// 是否缓存（0缓存 1不缓存）
        /// </summary>
        public char IsCache { get; set; }

        /// <summary>
        /// 菜单类型（M目录 C菜单 F按钮）
        /// </summary>
        public char MenuType { get; set; }

        /// <summary>
        /// 菜单显示状态（0显示 1隐藏）
        /// </summary>
        public char Visible { get; set; }

        /// <summary>
        /// 菜单状态（0正常 1停用）
        /// </summary>
        public char Status { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string Perms { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string Icon { get; set; }

    }
}
